package com.ruoyi.system.mapper;


import com.ruoyi.system.entity.Orders;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 操作orders相关数据接口
*/
public interface OrdersMapper {

    /**
      * 新增
    */
    int insert(Orders orders);

    /**
      * 删除
    */
    int deleteById(Integer id);

    /**
      * 修改
    */
    int updateById(Orders orders);

    /**
      * 根据ID查询
    */
    Orders selectById(Integer id);

    /**
      * 查询所有
    */
    List<Orders> selectAll(Orders orders);

    @Select("select * from `tb_merchant_service_transaction_record` where transaction_id = #{orderNo}")
    Orders selectByOrderNo(String orderNo);

//    @Update("UPDATE orders SET status = #{status} WHERE order_no = #{orderNo} and id = #{id}")
    int requestRefund(Orders orders);
}